<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<f:metadata>
    <f:viewParam name="partyname" value="#{partyBean.currentparty.name}"/>
</f:metadata>
	<h:body>
	<ui:include src="horizontal_menu.xhtml">
	</ui:include>
		<h:form>
		<c:if test="#{!partyBean.emptySet}">
		<c:catch>
		 <p:panel id="panel" style="margin-bottom:10px;">
      			 <f:facet name="header" >
      			 			<h:outputLabel value="#{partyBean.currentparty.name}" />
      			</f:facet>
				<f:facet name="actions">
        					<p:commandButton id="asktojoin" styleClass="ui-panel-titlebar-icon "
                         action="#{joinRequestBean.askForParty(partyBean.currentparty)}" value="Ask to Join"/>
    			</f:facet>
      			 <f:facet name="footer" >
							<p:commandButton id="pr" action="#{partyBean.previus()}" value="previousParty" rendered="#{partyBean.hasPrevious()}">
    						</p:commandButton>
    						<p:commandButton id="nx" style="margin-right:10px" action="#{partyBean.next()}" value="nextParty" rendered="#{partyBean.hasNext()}">
    						</p:commandButton>
                </f:facet>
        	<h:panelGrid columns="2">
            <h:outputLabel  value="Symbol:" />
         <h:graphicImage value="#{('/partysymbols/'.concat(partyBean.currentparty.symbol))}" width="200" height="171" />
 
            <h:outputLabel for="program" value="Program:" />
            <h:outputLabel id="program" value="#{partyBean.currentparty.program}" />
           <h:link id="partyname" outcome="memberlist" value="memberlist">
            	<f:param  name="partyname" value="#{partyBean.currentparty.name}" /> 
            </h:link>
        </h:panelGrid>
        
    </p:panel>
    </c:catch>
    </c:if>
    <c:if test="#{partyBean.emptySet}">
    <h1>There are no parties at the moment</h1></c:if>
	</h:form>
	</h:body>
</html>